﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
    /// <summary>
    /// 对应数据库中 sales_order 表的实体类
    /// </summary>
    public class OmSalesOrder
    {
        /// <summary>
        /// 销售订单ID，对应数据库表中 sales_order_id 列，
        /// </summary>
        [Key]
        public long SalesOrderId { get; set; }
        /// <summary>
        /// 客户ID，对应 customer_id 列，
        /// </summary>
        public long CustomerId { get; set; }

        /// <summary>
        /// 销售订单号，对应 sales_order_no 列，
        /// </summary>
        public string SalesOrderNo { get; set; }

        /// <summary>
        /// 销售人员，对应 seller_by 列，
        /// </summary>
        public long SellerBy { get; set; }

        /// <summary>
        /// 销售日期，对应 sales_date 列，
        /// </summary>
        public DateTime SalesDate { get; set; }

        /// <summary>
        /// 订单状态，对应 order_status 列，
        /// </summary>
        public string OrderStatus { get; set; }

        /// <summary>
        /// 审核人，对应 auditor_by 列，
        /// </summary>
        public long AuditorBy { get; set; }

        /// <summary>
        /// 审核时间，对应 auditor_time 列，
        /// </summary>
        public DateTime AuditorTime { get; set; }

        /// <summary>
        /// 审核意见，对应 auditor_comment 列
        /// </summary>
        public string AuditorComment { get; set; }

        /// <summary>
        /// 是否删除，对应 is_delete 列，
        /// </summary>
        public string IsDelete { get; set; }

        /// <summary>
        /// 创建人，对应 create_by 列，
        /// </summary>
        public long CreateBy { get; set; }

        /// <summary>
        /// 创建时间，对应 create_time 列，
        /// </summary>
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 更新人，对应 update_by 列，
        /// </summary>
        public long UpdateBy { get; set; }

        /// <summary>
        /// 更新时间，对应 update_time 列，
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 备注，对应 remarks 列
        /// </summary>
        public string Remarks { get; set; }
    }
    /// <summary>
    /// 映射实体类
    /// </summary>
    public class UserOrgInfo
    {
        /// <summary>
        /// 用户
        /// </summary>
        public string UsersName { get; set; }
        /// <summary>
        /// 所在部门
        /// </summary>
        public string OrgShortName { get; set; }
    }
    public class SalesOrderDTO
    {
        public long SalesOrderId { get; set; }
        public string SalesOrderNo { get; set; }
        public string CustomerName { get; set; }
        public string ContactPerson { get; set; }
        public string ContactPhon { get; set; }
        public string SellerBy { get; set; }
        public string SellerShortName { get; set; }
        public DateTime SalesDate { get; set; }
        public string OrderStatus { get; set; }
        public decimal AvailableQty { get; set; }
        public string GoodsNamelist { get; set; }
        public string AuditorBy { get; set; }
        public DateTime? AuditorTime { get; set; }
        public string AuditorComment { get; set; }
        public string IsDelete { get; set; }
        public string CreateBy { get; set; }
        public string CreateShortName { get; set; }
        public DateTime CreateTime { get; set; }
        public string UpdateBy { get; set; }
        public DateTime UpdateTime { get; set; }
        public string Remarks { get; set; }
        public decimal SalesQuantity { get; set; }
        public decimal SalesAmount { get; set; }
    }
    public class Auditor
    {
        /// <summary>
        /// 订单id
        /// </summary>
        public long Id { get; set; }
        /// <summary>
        /// 更改状态
        /// </summary>
        public string OrderStatus { get;set; }
        /// <summary>
        /// 审核人
        /// </summary>
        public long AuditorBy { get; set; }
        /// <summary>
        /// 审核时间
        /// </summary>
        public DateTime? AuditorTime { get; set; }
        /// <summary>
        /// 审核意见
        /// </summary>
        public string AuditorComment { get; set; }
    }
}
